import asyncio
from aiohttp import ClientSession


async def get(url):
    async with ClientSession() as session:
        result = await session.get(url)
        status, content = result.status, await result.text()
        print(f"{url} get success status:[{status}] content: {content}")


async def post(url, data):
    async with ClientSession() as session:
        result = await session.post(url, data=data)
        status, content = result.status, await result.text()
        print(f"{url} get success status:[{status}] content: {content}")


if __name__ == '__main__':
    asyncio.run(get("http://10.0.0.153:8001/cmd/stop_server"))
